.class Lcom/kuguo/ad/c;
.super Landroid/content/BroadcastReceiver;


# instance fields
.field final synthetic a:Lcom/kuguo/ad/KuguoAdsManager;


# direct methods
.method constructor <init>(Lcom/kuguo/ad/KuguoAdsManager;)V
    .locals 0

    iput-object p1, p0, Lcom/kuguo/ad/c;->a:Lcom/kuguo/ad/KuguoAdsManager;

    invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V

    return-void
.end method


# virtual methods
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
    .locals 7

    const/4 v6, 0x5

    const/4 v5, 0x1

    invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;

    move-result-object v0

    const-string v1, "android.intent.action.PACKAGE_ADDED"

    invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_2

    invoke-virtual {p2}, Landroid/content/Intent;->getData()Landroid/net/Uri;

    move-result-object v0

    invoke-virtual {v0}, Landroid/net/Uri;->toString()Ljava/lang/String;

    move-result-object v0

    const-string v1, "package:"

    invoke-virtual {v1}, Ljava/lang/String;->length()I

    move-result v1

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v2

    invoke-virtual {v0, v1, v2}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v0

    const-string v1, "android__log"

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "j "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Lcom/kuguo/c/a;->a(Ljava/lang/String;Ljava/lang/Object;)V

    invoke-static {p1, v0}, Lcom/kuguo/ad/a;->g(Landroid/content/Context;Ljava/lang/String;)Lcom/kuguo/ad/o;

    move-result-object v1

    if-eqz v1, :cond_2

    invoke-static {}, Lcom/kuguo/ad/KuguoAdsManager;->access$400()Ljava/util/Set;

    move-result-object v2

    invoke-interface {v2}, Ljava/util/Set;->isEmpty()Z

    move-result v2

    if-nez v2, :cond_0

    invoke-static {}, Lcom/kuguo/ad/KuguoAdsManager;->access$400()Ljava/util/Set;

    move-result-object v2

    invoke-interface {v2}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :goto_0
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    if-eqz v3, :cond_0

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object p0

    check-cast p0, Lcom/kuguo/ad/al;

    invoke-interface {p0, v1}, Lcom/kuguo/ad/al;->a(Lcom/kuguo/ad/o;)V

    goto :goto_0

    :cond_0
    const-string v2, "android__log"

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "update ad status "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    iget-object v4, v1, Lcom/kuguo/ad/o;->g:Ljava/lang/String;

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, " id : "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    iget v4, v1, Lcom/kuguo/ad/o;->h:I

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, " status : "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, v6}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {v2, v3}, Lcom/kuguo/c/a;->a(Ljava/lang/String;Ljava/lang/Object;)V

    invoke-static {p1}, Lcom/kuguo/ad/a;->k(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v2

    if-eqz v2, :cond_1

    invoke-static {p1}, Lcom/kuguo/ad/a;->k(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v2

    iget v3, v1, Lcom/kuguo/ad/o;->h:I

    invoke-static {v2, v3, v6}, Lcom/kuguo/ad/a;->a(Ljava/lang/String;II)Z

    :cond_1
    new-instance v2, Lcom/kuguo/ad/ab;

    invoke-direct {v2, p1}, Lcom/kuguo/ad/ab;-><init>(Landroid/content/Context;)V

    invoke-virtual {v2}, Lcom/kuguo/ad/ab;->a()V

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v2, ".apk"

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    iget v2, v1, Lcom/kuguo/ad/o;->h:I

    invoke-static {p1, v0, v2, v5}, Lcom/kuguo/ad/a;->a(Landroid/content/Context;Ljava/lang/String;IZ)V

    const-string v0, "ct.dat"

    iget v1, v1, Lcom/kuguo/ad/o;->h:I

    invoke-static {p1, v0, v1, v5}, Lcom/kuguo/ad/a;->a(Landroid/content/Context;Ljava/lang/String;IZ)V

    :cond_2
    return-void
.end method
